<?php
/**
 * Search a Mission
 *
 * @author Xavier VILAIN
 *
 */


use Fox\Dao\SqlFragment;
use Fox\Common\Customer;
use Fox\Html\Button;
use Fox\SearchEngine;


$searchScreen = new Fox\Html\Screen\Search\Basic('search',new Customer(),array('name1' => false),100,true);
$searchScreen
	->filter(array(new SqlFragment('type = ?',array('cust'))) )
		->screen()->pageTitle('Recherche Clients');
$searchScreen->screen()->toolbar()->add(new Button('create',Fox\Generator::url('material','create')));
$searchScreen->grid(Xview::instance()->component('customer','result',array('mode' => 'cust')));
$searchScreen->searchEngineOptions(SearchEngine::MODE_LIKE);
return $searchScreen->render();